saveAttributeDataForStyleable
open fun saveAttributeDataForStyleable(@NonNull view: View, @NonNull context: Context, @NonNull styleable: Array<Int>, @Nullable attrs: AttributeSet, @NonNull t: TypedArray, defStyleAttr: Int, defStyleRes: Int)(source)
Stores debugging information about attributes. This should be called in a constructor by every custom View that uses a custom styleable. If the custom view does not call it, then the custom attributes used by this view will not be visible in layout inspection tools. No-op before API 29.
Parameters
view
view for which to save the data.
context
Context under which this view is created.
styleable
A reference to styleable array R.styleable.Foo
attrs
AttributeSet used to construct this view.
t
Resolved TypedArray returned by a call to obtainAttributes.
defStyleAttr
Default style attribute passed into the view constructor.
defStyleRes
Default style resource passed into the view constructor.